// app.js
import './utils/utils'
import './utils/http'
App({
  userProfile: {},
  onLaunch() {
    //获取token
    this.getToken()
  },
  setToken(key, val) {
    this[key] = val
    wx.setStorageSync(key, val)
  },
  //读取本地存储的token
  getToken() {
    this.token = wx.getStorageSync('token')
    this.refreshToken = wx.getStorageSync('refreshToken')
  }
})
